home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / rexx / 830 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.2 KB

  1. Path: lyra.csx.cam.ac.uk!rdhw
  2. From: rdhw@cus.cam.ac.uk (Robin D.H. Walker)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: Desktops and Objects and EA's too!
  5. Date: 20 Feb 1996 11:15:20 GMT
  6. Organization: Queens' College, U of Cambridge, UK
  7. Distribution: inet
  8. Message-ID: <4gcag8$ot5@lyra.csx.cam.ac.uk>
  9. References: <MpSJx8r8RcPG090yn@freenet.durham.org>
  10. Reply-To: rdhw@cam.ac.uk (Robin Walker)
  11. NNTP-Posting-Host: bootes.cus.cam.ac.uk
  12.  
  13. In article <MpSJx8r8RcPG090yn@freenet.durham.org>,
  14.          Tim Middleton <as544@torfree.net> wrote:
  15.  
  16. >Can someone explain to me how Os/2's SysPutEA works. For example, here is
  17. >the example in rexx.inf...
  18. >
  19. >/* code */
  20. >type = "OS/2 Command File"
  21. >typeinfo = "DFFF00000100FDFF"x || d2c(length(type)) || '00'x || type
  22. >call SysPutEA "C:\CONFIG.SYS", "TYPE", typeinfo
  23. >
  24. >It's mostly clear to me except for all the junk in the "typeinfo" line...
  25. >can someone offer an explanation for that to me? Is there any resources on
  26. >the net that explain these things?
  27.  
  28. Here's something I threw together from an OS/2 v1.2 (!) programming guide:
  29.  
  30. OS/2 Extended Attributes Data Format for Rexx
  31.  
  32.  - by rdhw@cam.ac.uk (Robin Walker)
  33.  
  34. These are the formats of the value parts required by SysGetEA() and
  35. SysPutEA().
  36.  
  37. In the following "WORD" means two bytes assembled in Intel format, with
  38. LSB leading, MSB second.
  39.  
  40. EAs are of various types.
  41. Some EA types are single-valued, some EA types are multi-valued.
  42. The first word of an EA identifies the type.
  43. The layout of the rest of the EA depends on the type, but all single
  44. valued EAs share the same layout.
  45.  
  46. Format of a Single-Valued EAs:
  47.  
  48.         WORD    Type of EA
  49.                         'FFFE'x = EAT_BINARY    length-preceded binary
  50.                         'FFFD'x = EAT_ASCII     length-preceded ASCII
  51.                         'FFFB'x = EAT_BITMAP    length-preceded bitmap
  52.                         'FFFA'x = EAT_METAFILE  length-preceded metafile
  53.                         'FFF9'x = EAT_ICON      length-preceded icon
  54.                         'FFEE'x = EAT_EA        length-preceded EA name
  55.         WORD    Length of byte string following.
  56.         BYTES   Data field, of length given above. No terminator chars.
  57.  
  58. Format of Multi-Valued, Multi-Typed EA:
  59.  
  60.         WORD    Type of EA
  61.                         'FFDF'x = EAT_MVMT      Multi-valued, Multi-Type
  62.         WORD    CodePage        CodePage of data, zero = system default.
  63.         WORD    NumEntries      Number of Single-Valued EAs following.
  64.         SVEAs   Type/Length/Data triplets as defined above, repeated
  65.                         NumEntries times.
  66.  
  67. Format of Multi-Valued, Single-Typed EA:
  68.  
  69.         WORD    Type of EA
  70.                         'FFDE'x = EAT_MVST      Multi-valued Single-Type
  71.         WORD    CodePage        Codepage of data, zero = system default.
  72.         WORD    NumEntries      Number of length/data pairs below.
  73.         WORD    Type of length/data pairs that follow (see Single-valued)
  74.        [pairs
  75.                 WORD    Length
  76.                 BYTES   Data
  77.              ] repeated NumEntries times.
  78.  
  79. An EA type EAT_ASN1 ('FFDD'x) is also defined, the format of which I do
  80. not know.
  81.  
  82. -- 
  83. Robin Walker         (Network Admin), Queens' College, Cambridge, CB3 9ET, GB
  84. rdhw@cam.ac.uk   IBMmail:i1006437   Tel:+44 1223 335528   Fax:+44 1223 335566
  85.